import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2022-12-05
 * Time: 19:03
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str=scanner.nextLine();
        int a=0;
        int b=str.length()/3;
        String[] arr=new String[str.length()*2];
        arr=str.split("");
        for (int i = arr.length-1; i >0 ; i--) {
            arr[i+3]=arr[i];
            a++;
            if(a==3){
                arr[i+3]=",";
                a=0;
            }

        }
        for (String A:arr
             ) {
            System.out.println(A);
        }
    }
}
